package hierarchydisplay;

/* Init default display data in order to demonstrate display fuctionality. */
public class HierarchyInitData {
	
	/* Init default display data. */
	public static void load(HierarchyDisplay hd) {
		Node child1A = new Node(hd);
		child1A.setText("Child1A");
		Node child1B = new Node(hd);
		child1B.setText("Child1B");
		Node child2A = new Node(hd);
		child2A.setText("Child2A");
		Node child2B = new Node(hd);
		child2B.setText("Child2B");

		CompositeNode child1 = new CompositeNode(hd);
		child1.setText("Child1");
		child1.addChild(child1A);
		child1.addChild(child1B);
		
		CompositeNode child2 = new CompositeNode(hd);
		child2.setText("Child2");
		child2.addChild(child2A);
		child2.addChild(child2B);

		CompositeNode root = new CompositeNode(hd);
		root.setText("Root");
		root.addChild(child1);
		root.addChild(child2);
		
		hd.setRoot(root);
	}
}
